
import ac = module("utils/commons/array-collection");
import anc = module("main/org/sdmx/model/v2/base/AnnotationsCollection");
import ia = module("main/org/sdmx/model/v2/base/IdentifiableArtefact");
import is = module("main/org/sdmx/model/v2/base/InternationalString");
import va = module("main/org/sdmx/model/v2/base/VersionableArtefact");
import vaa = module("main/org/sdmx/model/v2/base/VersionableArtefactAdapter");
import cpmt = module("main/org/sdmx/model/v2/base/structure/Component");

/**
	* An abstract definition of a list of components. A concrete example is a 
	* key descriptor which defines the list of dimensions that make up a key 
	* for a key family.
	* 
	* @author Xavier Sosnovsky, Anthony Morel
	*/ 
export class ComponentList extends ac.ArrayCollection<cpmt.Component>
	implements ia.IdentifiableArtefact {
			
	/*==============================Fields================================*/
		
	private _versionableArtefact:va.VersionableArtefact;	
					
	/*===========================Constructor==============================*/
		
	constructor(id:string, source=null) {
		super(source);
		this._versionableArtefact =<va.VersionableArtefact> new vaa.VersionableArtefactAdapter(id);
	}
		
	/*============================Accessors===============================*/
			
	/**
		* @inheritDoc 
		*/
	public getUrn():string {
		return this._versionableArtefact.getUrn();
	}
		
	/**
		* @inheritDoc 
		*/
	public setUrn(urn:string) {
		this._versionableArtefact.setUrn(urn);
	}
		
	/**
		* @inheritDoc 
		*/
	public getName():is.InternationalString {
		return this._versionableArtefact.getName();
	}
		
	/**
		* @inheritDoc 
		*/
	public setName(name:is.InternationalString) {
		this._versionableArtefact.setName(name);
	}
		
	/**
		* @inheritDoc 
		*/
	public getDescription():is.InternationalString {
		return this._versionableArtefact.getDescription();
	}
		
	/**
		* @inheritDoc 
		*/
	public setDescription(description:is.InternationalString) {
		this._versionableArtefact.setDescription( description );
	}
		
	/**
		* @inheritDoc 
		*/
	public getUri():string {
		return this._versionableArtefact.getUri();
	}
		
	/**
		* @inheritDoc 
		*/
	public setUri(uri:string) {
		this._versionableArtefact.setUri(uri);
	}
		
	/**
		* @inheritDoc 
		*/
	public getId():string {
		return this._versionableArtefact.getId();
	}
		
	/**
		* @inheritDoc 
		*/
	public setId(id:string) {
		this._versionableArtefact.setId( id );
	}
		
	/**
		* @inheritDoc 
		*/
	public setAnnotations(annotations:anc.AnnotationsCollection) {
		this._versionableArtefact.setAnnotations(annotations);
	}
		
	/**
		* @inheritDoc 
		*/
	public getAnnotations():anc.AnnotationsCollection {
		return this._versionableArtefact.getAnnotations();
	}
}